package com.ej.web.controller.ej.app;

import com.ej.busi.dto.subject.EjSubjectDto;
import com.ej.busi.service.IEjSubjectService;
import com.ej.common.core.controller.BaseController;
import com.ej.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ej/app/subject")
@Api("【学科表】Controller")
public class EjAppSubjectController extends BaseController {

    @Autowired
    private IEjSubjectService subjectService;

    @RequestMapping("list")
    public AjaxResult<List<EjSubjectDto>> subjectList(Long parentId){
        return AjaxResult.success(subjectService.subjectList(parentId));
    }

}
